package org.dromara.pay.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 支付类型
 *
 * @author ruoyi
 */
@AllArgsConstructor
public enum PayType
{
    WECHATMINI("1", "微信小程序","JSAPI"),
    WECHATAPP("2", "微信APP","APP"),
    ALIPAY("3", "支付宝",""),
    UNIONPAY("4", "银联",""),
    BALANCE("5", "余额","");

    @Getter
    private final String code;
    @Getter
    private final String info;
    @Getter
    private final String type;

    public static String getInfoByCode(Integer code){
        return PayType.values()[code]==null?"": PayType.values()[code].getInfo();
    }
}
